package com.pearlsoft.webapp.rms.projectuse.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.pearlsoft.commons.utils.UUIDUtil;
import com.pearlsoft.util.StringUtils;
import com.pearlsoft.webapp.core.WebException;
import com.pearlsoft.webapp.core.dao.RecrodRowMapper;
import com.pearlsoft.webapp.core.dataset.Record;
import com.pearlsoft.webapp.core.service.BaseSimpleJdbcService;


@Service
public class ProjectuseService extends BaseSimpleJdbcService{

	private final String generalFields = " {0}.id,{0}.projectname,{0}.hostname, {0}.week, {0}.cpuavg,{0}.cpupeak,{0}.memoryavg,{0}.memorypeak,{0}.diskuse";
	private final RecrodRowMapper generalRowMapper = ProjectuseRowMapperHelper
			.generalRowMapper();
	
	

	public List<Record> getProjectuseList(){
		String sql=" select "+StringUtils.format(generalFields, "f")+" from rms_projectuse f order by projectname asc";
		return this.getBaseSimpleJdbcDao().query(sql, generalRowMapper);
	}
	


	
	
	
}
